﻿using MySql.Data.MySqlClient;

namespace BingoCommonConfig.Db
{
	public class PooledConnection
	{
		private MySqlConnection m_Connection = null;// 数据库连接
		private bool m_bBusy = false; // 此连接是否正在使用的标志，默认没有正在使用

		// 构造函数，根据一个 Connection 构告一个 PooledConnection 对象
		public PooledConnection(ref MySqlConnection connection)
		{
			m_Connection = connection;
		}

		// 返回此对象中的连接
		public MySqlConnection getConnection()
		{
			return m_Connection;
		}

		// 设置此对象的，连接
		public void setConnection(ref MySqlConnection connection)
		{
			m_Connection = connection;
		}

		// 获得对象连接是否忙
		public bool isBusy()
		{
			return m_bBusy;
		}

		// 设置对象的连接正在忙
		public void setBusy(bool busy)
		{
			m_bBusy = busy;
		}
	}
}